#pragma once

#include <string.h>
#include "device_locker.h"

#include "../mk_lib/mk_auto_mutex.h"

class device_mutex_locker : public device_locker
{
public:
	device_mutex_locker(void);
	~device_mutex_locker(void);

public:
	virtual int init(char * devName, void * lParam);

	virtual int lock(long timeOut);

	virtual int unlock();

	virtual int uninit();

public:
	char * get_mutext_name() { return _mutexName; }

private:
	mk_mutex	_mutex;
	
	char	_mutexName[512];
};
